Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit a34bfd7ab13a9a0d299e5dad382c815d3fe3c33f


Parents : 0f40200
Author : Ivan <ivan@quad4.io>
Signature : Invalid signer <e46112d44649266d71fe2193e00a4710>, author is <ivan@quad4.io>
Date : 2026-07-04T05:15:02-05:00

refactor(tests): improve readability of mock implementations in NotificationBell tests

Changes

2 files changed, 11 insertions(+), 6 deletions(-)


Diff

diff --git a/tests/frontend/NotificationBell.test.js b/tests/frontend/NotificationBell.test.js
index 545c1075..c0f41553 100644
--- a/tests/frontend/NotificationBell.test.js
+++ b/tests/frontend/NotificationBell.test.js
@@ -869,9 +869,9 @@ describe("NotificationBell live sync", () => {
it("polls unread count every 5s while dropdown is closed", async () => {
vi.useFakeTimers();
let unread = 4;
- global.api.get = vi.fn().mockImplementation(() =>
- Promise.resolve({ data: { notifications: [], unread_count: unread } })
- );
+ global.api.get = vi
+ .fn()
+ .mockImplementation(() => Promise.resolve({ data: { notifications: [], unread_count: unread } }));
const wrapper = mountBell();
await vi.runOnlyPendingTimersAsync();

diff --git a/tests/frontend/NotificationBellConversationSync.test.js b/tests/frontend/NotificationBellConversationSync.test.js
index 2b52a9d2..7a66fd8a 100644
--- a/tests/frontend/NotificationBellConversationSync.test.js
+++ b/tests/frontend/NotificationBellConversationSync.test.js
@@ -138,9 +138,14 @@ function createNotificationsApiMock() {
}
return Promise.resolve({ data: {} });
});
- return { get, post, markRead: () => {
- conversationRead = true;
- }, isRead: () => conversationRead };
+ return {
+ get,
+ post,
+ markRead: () => {
+ conversationRead = true;
+ },
+ isRead: () => conversationRead,
+ };
}
describe("NotificationBell conversation read sync", () => {


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────